Skip to main content

TsgHPGLImage

Unit: HPGL2

Description

The main TsgHPGLImage class is a descendant of TsgCADImage (which is a descendant of TGraphic) and overrides its methods. TsgHPGLImage can be used in the TImage control for displaying and navigation AutoCAD™ DWG drawings.

After loading a HPGL/HPGL2 file, its separate HPGL/DXF entities are accessible through the Converter property and its indexed property Entities. All entities are descendants of TsgDXFEntity. For example, the TEXT entity is the object of the TsgDXFText type, etc. In other words, the entities are common for both DXF and HPGL.

Syntax

TsgHPGLImage = class(TsgCADImage)

Properties

PropertiesDescription
MMHeightThe property contains the height of the HPGL or HPGL/2 drawing in 0.01 millimeter units.
MMWidthThe property contains the width of the HPGL or HPGL/2 drawing in 0.01 millimeter units.
UsePSInstructionThe property defines the mode of HPGL PS instruction using.
Properties derived from TsgCADImageDescription
BackgroundColorThe property specifies the background color of the drawing which TsgCADImage displays.
BlocksThe property lists the blocks references of the drawing.
BorderSizeThe property specifies the size of the drawing’s border in global points or ratio.
BorderTypeThe property sets the type of drawing’s border.
CachingRasterModeThe property specifies the size of drawing’s border in global points or ratio.
CBFormatThe property displays predefined clipboard format.
ColorToLineWeightThe property specifies the line weight for entities by colors.
ConverterThe property contains information about the loaded CAD file.
CurrentLayoutThe property sets the current layout.
DefaultColorThe property sets the color for elements which have white color in AutoCAD™ DXF/DWG
DimensionsVisibleThe property switches on or off dimension of the drawing.
DrawingBoxThe property defines drawing box.
DrawMatrixThe property gets the matrix used for drawing.
DrawModeThe property specifies the current color mode.
EntitiesThe property lists all the entities of the CAD file.
ExtentsThe property defines drawing's extents.
FileNameThe property gets and sets the name of the file from which the image is loaded.
IsDraw3DAxesThe property gets and sets 3Daxes drawing mode.
IsDrawingRotatedThe property defines if the drawing is rotated.
IsLoadingThe property defines if the drawing is loading.
IsPlottingThe property defines the destination source status.
IsProcessMessagesThe property defines the messages processing mode.
IsShowBackgroundThe property can be used to show background.
IsShowLineWeightThe property can be used to draw all entities with NullWidth pixel lineweights.
IsWithoutBorderThe property can be used to draw the drawing without adding the empty space (borders).
LayoutsThe property gets the indexed layout.
LayoutsCountThe property gets the number of layouts.
LineWeightScaleThe property gets and sets the line weight scale.
MillimetersThe property can be used to change the drawing units (millimeters/inches)
NullWidthThe property specifies the default line weight of entities with zero lineweight.
OwnSourceThe property indicates if data is loaded.
PureExtentsThe property defines the exact image field in world coordinates, with no empty space added.
ResizeDisproportionateDrawingThe property points to layer, containing given primitive if this layer is given.
ScaleThe property returns scale factor of the image as TFPoint structure.
ShowImagesThe property gets and sets the raster image drawing mode.
StretchThe property indicates whether the CAD drawing should be changed so that it exactly fits the bounds of the image control.
TextVisibleThe property switches on or off texts of the CAD image.
TTFModeThe property specifies the mode of the TTF fonts reflection.
UseWinEllipseThe property can be used for drawing most of the arcs and circles in the image using GDI Windows functions such as Ellipse, Arc, etc., not linearized.
ViewRectangleFor CAD Import VCL internal uses only.

Methods

MethodsDescription
AssignThe method copies a CAD image object and increase reference to the Converter object.
CommonToInternalUnitsThe method converts CAD coordinates of an image to the coordinates of the inner drawing's coordinate system.
ConvertHPGLStepsToMMThe method converts units of the TsgHPGLImage object from HPGL steps to millimeters.
ConvertMMToHPGLStepsThe method converts units of the TsgHPGLImage object from millimeters to the HPGL steps.
CreateCreates and initializes a new TsgHPGLImage object.
DestroyDestroys an instance of TsgHPGLImage
InternalToCommonUnitsThe method converts the coordinates of the inner drawing's coordinate system to the CAD coordinates of an image.
LoadFromStreamThe method loads a CAD image from stream.
MeasurementThe method returns the information about measurement system for linear and angular measures.
Methods derived from TsgCADImageDescription
AbsHeightThe method returns the entire height of the CAD image.
AbsWidthThe method returns the entire width of the CAD image.
AddScaledDXFThe method adds a new drawing to the TsgCADImage object.
AddScaledDXFExThe method adds a new drawing to the TsgCADImage object.
DrawRectThe method renders a part of a loaded drawing on a device context specified by DC.
ExportToMetafileThe method exports a CAD drawing to a Windows Enhanced metafile
GetCADCoordsThe method returns coordinates of a point on a drawing.
GetEntityColorThe method returns the entity's color.
GetExtentsThe method recalculates the drawing extents.
GetObjectSnapMaskThe method returns the object snap mode.
GetPointThe method converts point from the 3D coordinate system to the 2D coordinate system.
GetPointUCSThe method converts the UCS coordinates to the screen coordinates.
GetRealImagePointThe method the real coordinates of the point.
GetSnapDataThe method returns the data structure that contains the closest entity to the argument point, and the node point.
GetVisibleAreaThe method returns the visible area.
LoadFromClipboardFormatThe method loads from clipboard.
LoadFromFileThe method loads a CAD image from file.
RefreshCurrentLayoutThe method refreshes sizes of the current layout.
ResetDrawingBoxThe method switches off the drawing box.
RotateThe method rotates the current image.
RotDefaultThe method rotates the image to the default view.
RotToViewThe method rotates the image by parameter defined in A3DView.
SaveToClipboardFormatThe method saves to clipboard.
SaveToFileThe method saves the image to the file.
SaveToStreamThe method saves the image to the stream.
SetObjectSnapMaskThe method sets the object snap mode.
SetVisibleAreaThe method sets an area for snap.
StopLoadingThe method stops loading the file and displays only the loaded data.

Events

Events derived from TsgCADImageDescription
OnAfterRotateThe event occurs after a CAD image being rotated.
OnBeforeRotateThe event occurs before a CAD image being rotated.
OnLayoutChangeThe event occurs when a current layout is being changed.

Variables and constants

Variables and constantsDescription
CF_HPGLPredefined clipboard format for use in the LoadFromClipboardFormat method.